<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" >

<head>
    <meta charset="UTF-8">
    <title>考勤打卡</title>
</head>
<script type="text/javascript" th:src="@{/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/bootstrap-3.3.7-dist/js/bootstrap.min.js}"></script>
<link type="text/css" rel="stylesheet" th:href="@{/bootstrap-3.3.7-dist/css/bootstrap.min.css}">
<script type="text/javascript" th:src="@{/bootstrap-treeview/bootstrap-treeview.min.js}"></script>
<link type="text/css" rel="stylesheet" th:href="@{/bootstrap-treeview/bootstrap-treeview.min.css}">
<script type="text/javascript" th:src="@{/bootStrap-addTabs/bootstrap.addtabs.min.js}"></script>
<link type="text/css" rel="stylesheet" th:href="@{/bootStrap-addTabs/bootstrap.addtabs.css}">
<script type="text/javascript" th:src="@{/bootstrap-table/bootstrap-table.min.js}"></script>
<script type="text/javascript" th:src="@{/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<link type="text/css" rel="stylesheet" th:href="@{/bootstrap-table/bootstrap-table.min.css}">
<link type="text/css" rel="stylesheet" th:href="@{/bootstrap-fileinput/css/fileinput.css}">
<script type="text/javascript" th:src="@{/bootstrap-bootbox/bootbox.js}"></script>
<script type="text/javascript" th:src="@{/bootstrap-fileinput/js/fileinput.min.js}"></script>
<script th:src="@{/bootstrap-fileinput/js/locales/zh.js}"></script>
<body>
<!-- 查询列表-->
<table id="myTable"></table>

</body>
<script type="text/javascript">
    $("#myTable").bootstrapTable({
        url:"/xsjf/getMyxs",
        columns:[
            {field:"xuan",checkbox:true},
            {field:"xsid",title:"任务编号"},
            {field:"xstitle",title:"任务标题"},
            {field:"xscontent",title:"任务内容"},
            {field:"xsintegral",title:"任务积分"},
            {field:"ustatus",title:"任务完成度",formatter:function(value){
                    if(value ==1){
                        return "未完成";
                    }else if(value ==2){
                        return "已完成";
                    }else if(value ==3){
                        return "审核中。。。";
                    }

                }},
            {field:"cxz",title:"操作",formatter:function(value,row){
                    if(row.ustatus == 1){
                        var str='<button class="btn btn-info" onclick="advise('+row.xsid+')">我已完成,通知审核人</button>';
                        return str;
                    }else if(row.ustatus == 2){
                        var str='<span>已完成</span>';
                        return str;
                    }else if(row.ustatus == 3){
                        var str='<span>审核中。。。</span>';
                        return str;
                    }

                }},
        ],
        pagination:true,
        pageSize:10,
        pageList:[2,4,6,8,10],
        sidePagination: "client",
        toolbar:"#tb",
    })
</script>
</html>